#include <iostream>

using namespace std;

class a
{
private:
    int n;

public:
    a() : n(100) {}
    friend class b;
};

class b
{
public:
    static void print(a &stu)
    {
        cout << stu.n << endl;
        stu.n = 999;
        cout << stu.n << endl;
    }
};

int main()
{
    a a1;
    b::print(a1);
}